From 05505d6a1dcc89f424d2a2e4516f5cc310238a03 Mon Sep 17 00:00:00 2001 From: Michael Fulbright Date: Fri, 29 Oct 1999 22:43:51 +0000 Subject: [PATCH] image_load_increment(): Fixed bug when image width was not a multiple of 4 1999-10-29 Michael Fulbright * src/io-jpeg.c: image_load_increment(): Fixed bug when image width was not a multiple of 4 - always use the gdk_pixbuf rowstride to increment pointers! --- gdk-pixbuf/io-jpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c index b994780b44..c06a263495 100644 --- a/gdk-pixbuf/io-jpeg.c +++ b/gdk-pixbuf/io-jpeg.c @@ -466,7 +466,7 @@ image_load_increment (gpointer data, guchar *buf, guint size) rowptr = context->dptr; for (i=0; i < cinfo->rec_outbuf_height; i++) { *lptr++ = rowptr; - rowptr += cinfo->image_width * 3; + rowptr += context->pixbuf->art_pixbuf->rowstride;; } nlines = jpeg_read_scanlines (cinfo, lines, @@ -478,7 +478,7 @@ image_load_increment (gpointer data, guchar *buf, guint size) if (cinfo->output_components == 1) explode_gray_into_buf (cinfo, lines); - context->dptr += nlines * cinfo->image_width * 3; + context->dptr += nlines * context->pixbuf->art_pixbuf->rowstride; #ifdef DEBUG_JPEG_PROGRESSIVE if (start_scanline != cinfo->output_scanline) -- 2.30.2